import {request} from '@/utils/hsj/service/index'

// 查询邮件明细列表
export function listMailItem(query) {
    return request({
        url: "/email/item/list",
        method: "get",
        query,
    });
}

// 新增邮件明细
export function addMailItem(data) {
    return request({
        url: "/email/item",
        method: "post",
        data,
    });
}

// 修改邮件明细
export function updateMailItem(data) {
    return request({
        url: "/email/item",
        method: "put",
        data,
    });
}

// 删除邮件明细
export function delMailItem(mailItemId) {
    return request({
        url: `/email/item/${mailItemId}`,
        method: "delete",
    });
}

// 查询邮件明细详细
export function getMailItem(mailItemId) {
    return request({
        url: `/email/item/${mailItemId}`,
        method: "get",
    });
}

// 根据邮件明细Id发送邮件
export function sendEmailByMailItemId(mailItemId) {
    return request({
        url: `/email/item/sendEmail/${mailItemId}`,
        method: "post",
    });
}
